﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace housingsafety.server.Entities.DataModels
{
    [Table("zm_user_cj")]
    public partial class ZmUser : Repository.IEntity
    {
        [Key]
        [Column("id")]
        [StringLength(50)]
        public string Id { get; set; }
        [Required]
        [Column("number")]
        [StringLength(300)]
        public string Number { get; set; }
        [Column("phone")]
        [StringLength(300)]
        public string Phone { get; set; }
        [Column("encphone")]
        [StringLength(255)]
        public string Encphone { get; set; }
        [Column("uname")]
        [StringLength(255)]
        public string Uname { get; set; }
        [Column("nickname")]
        [StringLength(255)]
        public string Nickname { get; set; }

        [Column("unitname")]
        [StringLength(255)]
        public string Unitname { get; set; }
        [Column("avatar")]
        [StringLength(255)]
        public string Avatar { get; set; }
        [Column("pwd")]
        [StringLength(255)]
        public string Pwd { get; set; }
        [Required]
        [Column("salt")]
        [StringLength(255)]
        public string Salt { get; set; }
        [Column("disabled")]
        public short? Disabled { get; set; }
        [Column("is_delete")]
        public short? IsDelete { get; set; }
        [Column("sys_admin")]
        public short? SysAdmin { get; set; }
        [Column("sys_admin_by")]
        [StringLength(50)]
        public string SysAdminBy { get; set; }
        [Column("sys_admin_on", TypeName = "timestamp(6) without time zone")]
        public DateTime? SysAdminOn { get; set; }
        [Column("sys_admin_ip")]
        [StringLength(20)]
        public string SysAdminIp { get; set; }
        [Column("delete_on", TypeName = "timestamp(6) without time zone")]
        public DateTime? DeleteOn { get; set; }
        [Column("create_on", TypeName = "timestamp(6) without time zone")]
        public DateTime CreateOn { get; set; }
        [Column("modified_on", TypeName = "timestamp(6) without time zone")]
        public DateTime? ModifiedOn { get; set; }
        [Column("create_ip")]
        [StringLength(300)]
        public string CreateIp { get; set; }
        [Column("modified_ip")]
        [StringLength(300)]
        public string ModifiedIp { get; set; }
        [Column("descr")]
        [StringLength(255)]
        public string Descr { get; set; }
        [Column("email")]
        [StringLength(255)]
        public string Email { get; set; }
        [Column("lang")]
        [StringLength(45)]
        public string Lang { get; set; }
        [Column("lock_start_time", TypeName = "timestamp(6) without time zone")]
        public DateTime? LockStartTime { get; set; }
        [Column("lock_end_time", TypeName = "timestamp(6) without time zone")]
        public DateTime? LockEndTime { get; set; }
        [Column("login_count")]
        public int? LoginCount { get; set; }
        [Column("last_login_on", TypeName = "timestamp(6) without time zone")]
        public DateTime? LastLoginOn { get; set; }
        [Column("last_login_ip")]
        [StringLength(300)]
        public string LastLoginIp { get; set; }
        [Column("role_type")]
        public short? RoleType { get; set; }
        [Column("id_card")]
        [StringLength(255)]
        public string IdCard { get; set; }
        [Column("district", TypeName = "json")]
        public string District { get; set; }
        [Column(@"jurisdiction", TypeName = "json")]
        public string Jurisdiction { get; set; }
        [Column("group")]
        public short? Group { get; set; }
        [Column("create_by")]
        [StringLength(50)]
        public string CreateBy { get; set; }
        [Column("modified_by")]
        [StringLength(50)]
        public string ModifiedBy { get; set; }
        [Column("district_json")]
        public string DistrictJson { get; set; }
        [Column("jurisdiction_json")]
        public string JurisdictionJson { get; set; }
        [Column("survey_unit_id")]
        [StringLength(50)]
        public string SurveyUnitId { get; set; }



        [Column("qaakey")]
        [StringLength(255)]
        public string Qaakey { get; set; }

        
            
       [Column("is_secondary_account")]
        public short? IsSecondaryAccount { get; set; }
    }
}
